import React from 'react';
import ReactDOM from 'react-dom';
import './index.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';

/* 引入数据与方法文件 */
import store from './store/index';

/* 引入创建的上下文 */
import StoreContext from './context/StoreContext';

/* 引入路由模式 */
import {HashRouter} from 'react-router-dom';

ReactDOM.render(
		<StoreContext.Provider value={store}>
			<HashRouter>
				<App />
			</HashRouter>
		</StoreContext.Provider>,
	document.getElementById('root')	
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
